import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
//引入element-UI
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);

// 引入字体图标文件
import "./iconfont/iconfont.css";
//引入axios模块
import axios from "axios";
axios.defaults.baseURL = "http://127.0.0.1:5050";
// axios.defaults.baseURL = "http://xiaomibackapi.applinzi.com"; //数据API服务器的基础地址

axios.defaults.withCredentials = true; //让XHR发起异步请求时携带身份认证信息(cookie:sid)
axios.defaults.headers.post["Content-Type"] = "application/json"; //所有的POST请求主体的内容类型
Vue.prototype.$http = axios; //把axios声明为Vue实例的属性$http

new Vue({
  router,
  store,
  //渲染 挂载
  render: (h) => h(App),
}).$mount("#app");
